package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:17 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductTeamBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductTeam productTeam;

  protected BeanMap getBeanMap() {

    return new BeanMap(productTeam);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductTeamDAO.Id);

    mappedDaoFields.put(
        "productDefineId", com.ourteam.product.requirement.dao.IProductTeamDAO.ProductDefineId);

    mappedDaoFields.put("stafferId", com.ourteam.product.requirement.dao.IProductTeamDAO.StafferId);

    mappedDaoFields.put(
        "stafferRole", com.ourteam.product.requirement.dao.IProductTeamDAO.StafferRole);

    mappedDaoFields.put("status", com.ourteam.product.requirement.dao.IProductTeamDAO.Status);

    mappedDaoFields.put("remarks", com.ourteam.product.requirement.dao.IProductTeamDAO.Remarks);

    mappedDaoFields.put(
        "stafferName", com.ourteam.product.requirement.dao.IProductTeamDAO.StafferName);

    mappedDaoFields.put(
        "productName", com.ourteam.product.requirement.dao.IProductTeamDAO.ProductName);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductTeamBean() {
    super();

    this.productTeam = new com.ourteam.product.requirement.dao.ProductTeam();
  }

  public ProductTeamBean(com.ourteam.product.requirement.dao.ProductTeam productTeam) {
    super();

    this.productTeam = productTeam;
  }

  public com.ourteam.product.requirement.dao.ProductTeam convertToProductTeam() {
    return this.productTeam;
  }

  public com.ourteam.product.requirement.dao.ProductTeam convertTo() {
    return this.productTeam;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productTeam.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productTeam.setId(id);
  }

  /**
   * Get productDefineId
   *
   * @return long
   */
  public long getProductDefineId() {
    return (long) this.productTeam.getProductDefineId();
  }

  /**
   * Set productDefineId
   *
   * @parameter long
   */
  public void setProductDefineId(long productDefineId) {

    this.productTeam.setProductDefineId(productDefineId);
  }

  /**
   * Get stafferId
   *
   * @return long
   */
  public long getStafferId() {
    return (long) this.productTeam.getStafferId();
  }

  /**
   * Set stafferId
   *
   * @parameter long
   */
  public void setStafferId(long stafferId) {

    this.productTeam.setStafferId(stafferId);
  }

  /**
   * Get stafferRole
   *
   * @return String
   */
  public String getStafferRole() {
    return (String) this.productTeam.getStafferRole();
  }

  /**
   * Set stafferRole
   *
   * @parameter String
   */
  public void setStafferRole(String stafferRole) {

    this.productTeam.setStafferRole(stafferRole);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productTeam.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productTeam.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productTeam.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productTeam.setRemarks(remarks);
  }

  /**
   * Get stafferName
   *
   * @return String
   */
  public String getStafferName() {

    return (String) this.productTeam.getStafferName();
  }

  /**
   * Get productName
   *
   * @return String
   */
  public String getProductName() {

    return (String) this.productTeam.getProductName();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductTeamBean) == false) {
      return false;
    } // end if

    ProductTeamBean other = (ProductTeamBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductTeam tempProductTeam = other.convertToProductTeam();

    if (tempProductTeam == null || this.productTeam == null) {
      isEqual = false;
    } else if (tempProductTeam == this.productTeam || tempProductTeam.equals(this.productTeam)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductTeamBean[] toArray(
      com.ourteam.product.requirement.dao.ProductTeam[] aProductTeams) {

    return toArray(aProductTeams, null);
  }

  public static ProductTeamBean[] toArray(
      com.ourteam.product.requirement.dao.ProductTeam[] aProductTeams,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductTeams)) {
      return new ProductTeamBean[0];
    }

    int length = aProductTeams.length;

    ProductTeamBean[] beans = new ProductTeamBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductTeamBean(aProductTeams[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductTeams[i]});
      }
    }

    return beans;
  }
}
